<?php
$envConfig = [];




$h5Host = "http://www-superios-dc.mx.dev.ksmdev.top";
$apiHost = 'http://api-superios-dc.mx.dev.ksmdev.top';//API地址


$defaultConfig = [
    'basePath' => [
        'default' => $apiHost,
    ],

    // 1.0.0 版本的h5页面地址
    'h5Url' => [
        'zhimaReturnUrl' => $h5Host . '/#/sesameCredit',
        'didiZhimaReturnUrl' => $h5Host . '/#/sesameDidiReturn',
        'loanDetailUrl' => $h5Host . '/#/borrowdetail?orderId=%s&productId=%s',
        'downloanUrl' => $h5Host . '/#/downLoad',
        'repayUrl' => $h5Host . '/#/?orderId=%s&productId=%s',
        'bindCardUrl' => $h5Host . '/#/addnormalcard',
        'yysUrl' => $apiHost . '/credit-web/mobileApproveGetCapH5', // 运营商认证h5地址
        // 'cashmanOrderCallbackUrl' => 'http://120.55.44.90:26000/api/youmi/order/updateYoumiOrder',
        // 'cmsYouzhiProductUrl' => '120.55.44.90:26420/openApi/productList',
        'complaintUrl'=>$h5Host.'/#/complaint?productId=%s',//103投诉页面H5
        'productUrl'=>$h5Host.'/#/apiDetails?productId=%s',//103产品详情H5
        'orderUrl'=>$h5Host.'/#/loanDetailsV3?orderId=%s&productId=%s',//103订单详情页面
        'bankUrl'=>$h5Host.'/#/tiedCardV3?orderId=%s&productId=%s',//103绑卡地址
        'basicUrl'=>$h5Host.'/#/basicInfo?orderId=%s&productId=%s',//103基本信息认证页面
        'confirmUrl'=>$h5Host.'/#/confirmOfLoanV3?orderId=%s&productId=%s',//103确认用款页面
        'repaymentUrl'=>$h5Host.'/#/repaymentPageV3?orderId=%s&productId=%s',//103还款
        'errorUrl'=>$h5Host.'/#/jointLogonFail',//103准入失败页面
        'h5Middle'=>$h5Host.'/#/middlePage?productId=%s' //104h5中间页
    ],
    'scheme' => 'superp://sp.superpre.com/',
    // 1.0.2 版本的h5页面地址
    'h5Url-1.0.2' => [
        'bindCardUrl' => $h5Host . '/#/tiedCard', // 银行卡绑定页面
        'loanDetailUrl' => $h5Host . '/#/loanDetails?orderId=%s&productId=%s', // 借款详情页
        'redPacketUrl' => $h5Host . '/#/redPacket',      //红包跳转页
        'repayUrl' => $h5Host . '/#/repaymentPage?orderId=%s&productId=%s',  //1.0.2还款
        'loanAuditFailedUrl' => $h5Host . '/#/loanAuditFailed', // 额度授信失败页
        'confirmLoan' => $h5Host . '/#/confirmOfLoan', // 确认借款页
        'customerService' => $h5Host.'/#/customerService'  //客服中心跳转页
    ],
    //联登失败H5服务器地址
    'UNION_ERROR_URL' => $h5Host,
    'H5_URL' => $h5Host,
    'API_URL' =>$apiHost,

    'promotionPage'=>[
        'gettokenUrl' => "http://creditdata.test.kdcredit.com:8080/client/authorize/token",
        'blackcheckUrl'=>'http://creditdata.test.kdcredit.com:8080/v2/blacklist/black-list/check'
    ],
    'loginLogReportUrl' => [
        'baseUrl'=>'http://cashman-api.lianmi.local',
        'query'=>'/api/youmi/user/login-log-report',
    ],

    //docker3 接口地址 测试用
    'riskUserTagDomin'=>'http://47.96.31.154:29000/api',
    'riskUserTagDominNew'=>'http://risk-control-api.lianmi.local',
    //'riskUserTagDomin'=>'http://risk-api.xianjinxia.com/api',

    'apiProducts' => [
        //        "superprestamo" => "http://47.89.240.43:8083/",
    ],


    'channel_api'=>[
        'url'=>'http://120.55.40.158:27500'
    ],



    'recall_user_activity'=>[
        'recall_url'=>$h5Host.'/#/'.'recallActivity'
    ],
    'Sms_url'=>'http://120.55.40.158:21070/uninoty/api/message/smsBatchSend',
    'hour_url'=> $h5Host.'/#/creditCeilingPromote',


    //渠道管理 - 落地页域名配置
    'channel_link_domain' => $h5Host.'/#/registerTemplate',

    //渠道管理 - 下载页域名配置
    'channel_download_link_domain' => $h5Host.'/#/downloadTemplate',

    //渠道管理 - 钱袋掌柜 - 落地页域名配置
    'channel_qdzg_link_domain' => $h5Host.'/#/registerTemplate',

    //渠道管理 - 钱袋掌柜 - 下载页域名配置
    'channel_qdzg_download_link_domain' => $h5Host.'/#/downloadTemplate',

    'singleProductAgreement' => [
        [
            'position' => 1,
            'title' => '个人信息使用及授权协议',
            'url' => $h5Host.'/#/AuthorAgreement',
        ],
        [
            'position' => 2,
            'title' => '隐私政策及信息授权协议',
            'url' => $h5Host.'/#/PrivacyAgreement',
        ]
    ],
    //java分期服务地址
    'javaFqServiceHost' => 'http://dev.ksmdev.top:8066',

    //活体检测
//    'liveDetection' => [
//        'apiId' => 'f0af03500c6e482895d79f219820ede9',
//        'secret' => '406fe4f033b0423f8161ee062b81a1b3'
//    ],

];

/*if(version_compare($appVersion, '1.1.1', '>=')){
    $defaultConfig['scheme'] = 'sxsp://sp.sx.superp/';
}*/
$config = yii\helpers\ArrayHelper::merge(
    $defaultConfig,
    $envConfig
);
return yii\helpers\ArrayHelper::merge($config, Yml::config('params'));
